Ext.define('resources.Config', {

			defaultFileSmallIcon : Constants.SER_RES_PATH + 'icon/default_app_small.png',
			defaultFileLargeIcon : Constants.SER_RES_PATH + 'icon/default_app_large.png',
			defaultFolderSmallIcon : Constants.SER_RES_PATH + 'icon/folder_small.png',
			defaultFolderlargeIcon : Constants.SER_RES_PATH + 'icon/folder_large.png',
			defaultWallpaper : Constants.DESK_RES_PATH
					+ 'wallpapers/wallpaper_14.png',
			defaultWallpaperName : 'WebOS',
			defaultIETheme : 'blue',
			defaultTheme : {
				desktop : 'black',
				tradition : 'gray'
			},

			getIcons : function(name, isFolder) {
				var me = this;
				if (isFolder) {
						return {
							large : this.defaultFolderlargeIcon,
							small : this.defaultFolderSmallIcon
						};
					} 
				if (typeof name != 'string' || !this.icons[name]) {
						return {
							large : this.defaultFileLargeIcon,
							small : this.defaultFileSmallIcon
						};
				}
				return this.icons[name];
			},

			getAllThemes : function() {
				var vfName = core.getActiveView().name;
				var themes = [];
				for (var p in this.themes[vfName]) {
					var obj = {
						id : p,
						name : this.themes[vfName][p]['name'],
						src : this.themes[vfName][p]['src'],
						IESupport : this.themes[vfName][p]['IESupport']
					}
					themes.push(obj);
				}
				return themes;
			},

			getThemeCss : function(name) {
				
				var vfName = core.getActiveView().name;
				if (typeof name == 'string' && this.themes[vfName][name]) {
					this.themes[vfName][name]['id'] = name;
					return this.themes[vfName][name];
				} else {
					this.themes[vfName][this.defaultTheme[vfName]]['id'] = this.defaultTheme[vfName];
					return this.themes[vfName][this.defaultTheme[vfName]];
				}
			},

			getWallpaper : function(name) {
				if (typeof name != 'string' || !this.wallpapers[name]) {
					return {
						name : this.defaultWallpaperName,
						src : this.defaultWallpaper
					};
				}
				return {
					name : name,
					src : this.wallpapers[name]
				};
			},

			getWallpaperData : function() {
				var me = this;
				var result = [];
				for (var p in me.wallpapers) {
					var data = {
						name : p,
						src : me.wallpapers[p]
					}
					result.push(data)
				}
				return result;
			},

			themes : {
				desktop : {
					'black' : {
						name : '酷黑',
						src : Constants.THEME_RES_PATH
								+ 'css/desktop_black.css',
						IESupport : false
					},
					'blue' : {
						name : '天蓝',
						src : Constants.THEME_RES_PATH
								+ 'css/common_blue.css',
						IESupport : true
					},
					'green' : {
						name : '草绿',
						src : Constants.THEME_RES_PATH
								+ 'css/common_green.css',
						IESupport : true
					}
				},

				tradition : {
					'blue' : {
						name : '天蓝',
						src : 'ext/resources/css/ext-all.css'
					},
					'gray' : {
						name : '灰色',
						src : 'ext/resources/css/ext-all-gray.css'
					},
					'neptune' : {
						name : '清新',
						src : 'ext/resources/css/ext-neptune.css'
					},
					'access' : {
						name : '酷黑',
						src : 'ext/resources/css/ext-all-access.css'
					}
				}
			},

			icons : {
				'explorer' : {
					large : Constants.DESK_RES_PATH
							+ 'icon/share/explorer_large.png',
					small : Constants.DESK_RES_PATH
							+ 'icon/share/explorer_small.png'
				},
				'controlpanel' : {
					large : Constants.DESK_RES_PATH
							+ 'icon/share/config_large.png',
					small : Constants.DESK_RES_PATH
							+ 'icon/share/config_small.png'
				},
				'dustbin' : {
					large : Constants.DESK_RES_PATH
							+ 'icon/share/dustbin_large.png',
					small : Constants.DESK_RES_PATH
							+ 'icon/share/dustbin_small.png'
				},

				// ~~~~~~~~~~~~~~~~~~~~~~~~~~~`services~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`

				
				
				
				'Service_user' : {
					large : Constants.SER_RES_PATH + 'icon/user_large.png',
					small : Constants.SER_RES_PATH + 'icon/user_small.png'
				},
				'Service_module' : {
					large : Constants.SER_RES_PATH + 'icon/module_large.png',
					small : Constants.SER_RES_PATH + 'icon/module_small.png'
				},
				'Service_role' : {
					large : Constants.SER_RES_PATH + 'icon/role_large.png',
					small : Constants.SER_RES_PATH + 'icon/role_small.png'
				},
				'Service_syslog' : {
					large : Constants.SER_RES_PATH + 'icon/syslog_large.png',
					small : Constants.SER_RES_PATH + 'icon/syslog_small.png'
				}
			},

			wallpapers : {
				'WebOS' : Constants.DESK_RES_PATH
						+ 'wallpapers/wallpaper_14.png',
				'科幻' : Constants.DESK_RES_PATH + 'wallpapers/wallpaper_0.jpg',
				'鱼缸' : Constants.DESK_RES_PATH + 'wallpapers/wallpaper_12.jpg'

			}

		})